//
// Created by Tony on 2024/6/14.
//

#ifndef RUNTIME_STORE_V_H
#define RUNTIME_STORE_V_H

#include "Instruction.h"

namespace Runtime {

class STORE_V : public Index16Instruction {

public:
    STORE_V() : Index16Instruction(__func__, OpCode::STORE_V) {}

    void execute(RtData::Frame& frame) override {
        auto slot = frame.popSlot();
        frame.setSlot(mIndex, slot);
    }
};

} // namespace Runtime

#endif // RUNTIME_STORE_V_H